home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 2
/
Amiga Tools 2.iso
/
grafik
/
bildanzeiger
/
seepix
/
source.lha
/
SPFont.c
< prev
next >
Wrap
Text File
|
1992-11-27
|
12KB
|
246 lines
/**SPFont.c**************************************************************
* *
* SeePix -- by Hank Schafer *
* *
* SeePix is an IFF Picture Viewer. It works with Lo-Res, *
* Med-Res, Hi-Res, HAM, and EHB formats. I'm working on support *
* for X-Specs, and Anim5 formats. *
* *
* SeePix is based on a program by Olaf Barthel, called *
* 'LoadImage'. As released, LoadImage had a couple of bugs. *
* The Amiga-Key alternatives to menu use didn't all work. That's *
* been fixed. There were two separate print functions in LoadImage *
* which behaved exactly the same. The redundancy was eliminated. *
* LoadImage used the Topaz ROMFONT, and made no allowances for a *
* different system default font (under 2.04). I added a built-in *
* font. I've reworked the code considerably from the original *
* release, to allow for optimizations based on time and space. *
* *
* SeePix features a palette tool which allows "tweaking" of colors *
* prior to printing, allowing you to modify the color printout to *
* more closely resemble the original graphics (Blue is Blue, not *
* Purple). SeePix can be Iconified. SeePix features an ARP *
* interface. SeePix now uses the PathMaster File Selector. *
* *
************************************************************************
* *
* SeePix Copyright © 1992 by Hank Schafer; all rights reserved. *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 1, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to: *
* Free Software Foundation, Inc. *
* 675 Massachusetts Ave. *
* Cambridge MA 02139, USA *
* *
**************** Special Function Copyright Notices ********************
* *
****LoadImage Copyright Notice: *
* *
* LoadImage is © Copyright 1988, 1989, 1990 by MXM, all rights *
* reserved, written by Olaf Barthel. No guarantees of any kind are *
* made that this program is 100% reliable. Use this program on *
* your own risk! *
* *
****Iconify Copyright Notice: *
* *
* Copyright 1987 by Leo L. Schwab. *
* Permission is hereby granted for use in any and all programs, *
* both Public Domain and commercial in nature, provided this *
* Copyright notice is left intact. *
* *
****ColorWindow (Palette) Copyright Notice: *
* *
* ColorWindow Routine -- Color Window Routines *
* from Book 1 of the Amiga Programmers' Suite by RJ Mical *
* *
* Copyright (C) 1986, 1987, Robert J. Mical *
* All Rights Reserved. *
* *
****PathMaster Copyright Notice: *
* *
* -------------------------------------------------------------------- *
* Copyright © 1989 Justin V. McCormick. All Rights Reserved. *
* -------------------------------------------------------------------- *
* *
* The PathMaster name is a trademark of Justin V. McCormick. *
* *
* PathMaster File Selector source and documentation written by: *
* *
* Justin V. McCormick. *
* Copyright © 1989 by Justin V. McCormick. *
* All Rights Reserved. *
* *
* -------------------------------------------------------------------- *
************************************************************************
* *
* Hope this is something you can use and enjoy. *
* *
************************************************************************/
/*
* SeePix' internal font... the code was generated by Gregg Tavares'
* "ExtractFont" program. Thanx, Gregg.
*/
/*
* The font is based on the PD venus.font. This font has fewer characters
* than the original SPFont, and results in an executable that is 524 bytes
* smaller than with the original font.
*/
/*
* This font contains special characters at $85 \205 (a special underscore
* character) and at $7F \177 (the TradeMark symbol). Also important to any
* font used for SeePix is the Copyright circled-C at $A9 \251 and the
* underscored 'o' at $BA \272.
*/
static char fontname[] = "seepix.font";
static UWORD CharData[] =
{
0x0018, 0x6600, 0x1000, 0x3818, 0x1c70, 0x0000, 0x0000, 0x0003,
0x7c18, 0x7cfe, 0x02fe, 0x0cfe, 0x7c7c, 0x0000, 0x0c00, 0x60fc,
0x7c10, 0xf87e, 0xfefe, 0xfe7c, 0xc63c, 0x06c6, 0xc082, 0x867c,
0xfe7c, 0xfe7e, 0xfcc6, 0xc6c6, 0xc6c6, 0x7e7c, 0xc07c, 0x1000,
0x3000, 0xc000, 0x0600, 0x3c00, 0xc030, 0x18c0, 0x3800, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x001c, 0x1878, 0x76e0,
0x3cc3, 0xc3e1, 0x3800,
0x0018, 0x666c, 0x7cc6, 0x6c18, 0x3018, 0xd618, 0x0000, 0x0006,
0xc638, 0x060c, 0x06c0, 0x1806, 0xc6c6, 0x0000, 0x1800, 0x3006,
0xc638, 0xccc0, 0xc6c0, 0xc0c0, 0xc618, 0x06c6, 0xc0c6, 0xc6c6,
0xc6c6, 0xc6c0, 0x30c6, 0xc6c6, 0x6cc6, 0x0660, 0x600c, 0x3800,
0x3000, 0xc000, 0x0600, 0x6000, 0xc000, 0x00c0, 0x1800, 0x0000,
0x0000, 0x0000, 0x3000, 0x0000, 0x0000, 0x0030, 0x180c, 0xdc5b,
0x66c6, 0xc633, 0x6c00,
0x0018, 0x44fe, 0xd0cc, 0x3810, 0x600c, 0x3818, 0x0000, 0x000c,
0xce18, 0x0618, 0x26fc, 0x300c, 0xc6c6, 0x3030, 0x3000, 0x183c,
0xce6c, 0xc8c0, 0xc6c0, 0xc0c0, 0xc618, 0x06cc, 0xc0ee, 0xe6c6,
0xc6c6, 0xc67c, 0x30c6, 0xc6d6, 0x38c6, 0x0c60, 0x300c, 0x6c00,
0x107c, 0xdc7e, 0x767c, 0x607e, 0xdc30, 0x18cc, 0x18c6, 0xfc7c,
0xfc7e, 0x7e7e, 0xfcc6, 0xc6c6, 0xc6c6, 0xfe30, 0x180c, 0x0055,
0xdbcc, 0xcc66, 0x6c00,
0x0018, 0x886c, 0x7c18, 0x7020, 0x600c, 0xfe7e, 0x0000, 0x0018,
0xd618, 0x3c3c, 0x6606, 0x7c7e, 0x7c7c, 0x3030, 0x607e, 0x0c30,
0xcec6, 0xdcc0, 0xc6ce, 0xcece, 0xc618, 0x06f8, 0xc0fe, 0xf6d6,
0xccc6, 0xcc06, 0x30c6, 0xc6fe, 0x387c, 0x7e60, 0x180c, 0xc600,
0x0806, 0xc6c0, 0xc6c6, 0x6cc6, 0xc630, 0x18f8, 0x18fe, 0xc6c6,
0xc6c6, 0x60c0, 0x30c6, 0xc6c6, 0x6cc6, 0x0ce0, 0x1806, 0x0011,
0xd3db, 0xde3d, 0x3800,
0x0018, 0x00fe, 0x1630, 0xd800, 0x600c, 0x3818, 0x007c, 0x0030,
0xe618, 0x6006, 0xc60c, 0xc630, 0xc618, 0x0000, 0x3000, 0x1830,
0xcec6, 0xc6c0, 0xccc0, 0xc0c6, 0xfe18, 0x06cc, 0xc0d6, 0xdec6,
0xf8ca, 0xf806, 0x30c6, 0x6cee, 0x6c18, 0x3060, 0x0c0c, 0x0000,
0x0076, 0xc6c0, 0xc6de, 0x60c6, 0xc630, 0x18cc, 0x18d6, 0xc6c6,
0xc6c6, 0x607c, 0x30c6, 0x6cd6, 0x38c6, 0x3830, 0x180c, 0x0000,
0xdb37, 0x33fb, 0x00ff,
0x0000, 0x006c, 0x1666, 0xcc00, 0x3018, 0xd618, 0x3000, 0x3060,
0xc618, 0xc00c, 0xfe18, 0xc660, 0xc630, 0x3030, 0x187e, 0x3000,
0xc0fe, 0xc6c0, 0xd8c0, 0xc0c6, 0xc618, 0x06c6, 0xc0c6, 0xcec6,
0xc0cc, 0xcc0c, 0x30c6, 0x38c6, 0xc618, 0x6060, 0x060c, 0x0000,
0x00c6, 0xc6c0, 0xc6c0, 0x6076, 0xc630, 0x18c6, 0x18c6, 0xc6c6,
0xc6c6, 0x6006, 0x30c6, 0x38fe, 0x6c76, 0x6030, 0x180c, 0x0000,
0x666d, 0x6637, 0x7c00,
0x0018, 0x0000, 0x7cc6, 0x7600, 0x1c70, 0x0000, 0x3000, 0x30c0,
0x7c18, 0xfe18, 0x0630, 0x7cc0, 0x7c60, 0x3030, 0x0c00, 0x6030,
0x7cc6, 0xfc7e, 0xf0fe, 0xc07e, 0xc63c, 0xfcc6, 0xfec6, 0xc67c,
0xc076, 0xc618, 0x307c, 0x1082, 0xc618, 0xfe7c, 0x037c, 0x00fe,
0x007e, 0xfc7e, 0x7e7c, 0x6006, 0xc630, 0x18c6, 0x18c6, 0xc67c,
0xdc76, 0x600c, 0x1c7e, 0x10c6, 0xc60c, 0xfe1c, 0x1878, 0x0000,
0x3ccf, 0xcc6f, 0x0000,
0x0000, 0x0000, 0x1000, 0x0000, 0x0000, 0x0000, 0x6000, 0x0000,
0x0000, 0x0030, 0x0060, 0x0080, 0x00c0, 0x0060, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0030, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x007c, 0x0000, 0xf000, 0x0000, 0x0000,
0xc006, 0x0018, 0x0000, 0x0000, 0x0078, 0x0000, 0x1800, 0x0000,
0x0001, 0x0fc3, 0x0000,
};
static ULONG CharLoc[] =
{
0x00000008, 0x00080008, 0x00100008, 0x00180008,
0x00200008, 0x00280008, 0x00300008, 0x00380008,
0x00400008, 0x00480008, 0x00500008, 0x00580008,
0x00600008, 0x00680008, 0x00700008, 0x00780008,
0x00800008, 0x00880008, 0x00900008, 0x00980008,
0x00a00008, 0x00a80008, 0x00b00008, 0x00b80008,
0x00c00008, 0x00c80008, 0x00d00008, 0x00d80008,
0x00e00008, 0x00e80008, 0x00f00008, 0x00f80008,
0x01000008, 0x01080008, 0x01100008, 0x01180008,
0x01200008, 0x01280008, 0x01300008, 0x01380008,
0x01400008, 0x01480008, 0x01500008, 0x01580008,
0x01600008, 0x01680008, 0x01700008, 0x01780008,
0x01800008, 0x01880008, 0x01900008, 0x01980008,
0x01a00008, 0x01a80008, 0x01b00008, 0x01b80008,
0x01c00008, 0x01c80008, 0x01d00008, 0x01d80008,
0x01e00008, 0x01e80008, 0x01f00008, 0x01f80008,
0x02000008, 0x02080008, 0x02100008, 0x02180008,
0x02200008, 0x02280008, 0x02300008, 0x02380008,
0x02400008, 0x02480008, 0x02500008, 0x02580008,
0x02600008, 0x02680008, 0x02700008, 0x02780008,
0x02800008, 0x02880008, 0x02900008, 0x02980008,
0x02a00008, 0x02a80008, 0x02b00008, 0x02b80008,
0x02c00008, 0x02c80008, 0x02d00008, 0x02d80008,
0x02e00008, 0x02e80008, 0x02f00008, 0x02f80008,
0x03000008, 0x03080008, 0x03100008, 0x03180008,
0x03200008, 0x03280008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x00000008, 0x03000008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x00000008, 0x00000008, 0x00000008, 0x00000008,
0x03080008, 0x03100008, 0x03180008,
};
struct TextFont SeePixFont =
{
{ /* Message */
{ /* Node */
NULL, /* ln_Succ */
NULL, /* ln_Pred */
NT_FONT, /* ln_Type */
0, /* ln_Pri */
fontname, /* ln_Name */
},
NULL, /* mn_ReplyPort */
sizeof(SeePixFont) +
sizeof(fontname) +
sizeof(CharData) +
sizeof(CharLoc) +
0, /* mn_Length */
},
8, /* tf_YSize */
0, /* tf_Style */
66, /* tf_Flags */
8, /* tf_XSize */
6, /* tf_Baseline */
1, /* tf_BoldSmear */
0, /* tf_Accessors */
32, /* tf_LoChar */
190, /* tf_HiChar */
(APTR) & CharData, /* tf_CharData */
102, /* tf_Modulo */
(APTR) & CharLoc, /* tf_CharLoc */
NULL, /* tf_CharSpace */
NULL, /* tf_CharKern */
};